/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.pos.ui.beans;

import com.pos.domain.ItemTransaction;
import com.pos.domain.LineItem;
import com.pos.services.BaseService;
import com.pos.ui.jsf.util.JsfUtil;
import javax.annotation.PostConstruct;
import javax.faces.model.SelectItem;
import javax.inject.Inject;

/**
 *
 * @author suraj
 */
public abstract class TradingBean {

    @Inject
    protected transient BaseService baseService;
    protected ItemTransaction itemTransaction;
    protected LineItem item;

    public SelectItem[] getItems() {
        return JsfUtil.getSelectItems(baseService.findAllProduct(), false);
    }

    public abstract String processRequest();

    @PostConstruct
    public abstract void reset();

    public abstract void resetLineItem();

    public abstract LineItem getLineItem();
}
